#include "inorderTraversal.h"

void inorder(TreeNode* root, std::vector<int> &vec)
{
	if (root == nullptr)
	{
		return;
	}
	inorder(root->left, vec);
	vec.push_back(root->val);
	inorder(root->right, vec);
}

std::vector<int> inorderTraversal(TreeNode* root)
{
	std::vector<int> vec;
	vec.clear();

	inorder(root, vec);
	return vec;
}
